<%-- 
    Document   : add_group
    Created on : 2011-11-16, 11:25:36
    Author     : liuhanning
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" />        

        <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-1.6.1.min.js"></script>
        <script>
           
            function  add(){
                var content=$("#content").val();
                
                if(content==null)
                {
                    alert("请填写留言内容！");
                    return false;
                }
                var authorName=$("#authorName").val();
   
                if(authorName==null)
                {
                    alert("请填写留言人的名字!");
                    return false;
                }
                $.post("${pageContext.request.contextPath}/message/addmessage.action",{ "msg.content" :content,"msg.authorName":authorName}, function(data){if(data=="success"){window.close();}},null);
              
            }
        </script>

    </head>
    <body>



        <table align="center" border="0" bordercolor="#666666" cellpadding="4" cellspacing="4" width="100%">
            <tbody><tr>
                    <td colspan="2" bgcolor="#eeeeee" style="font-size: 12px;">用户留言</td>
                </tr>
                <tr>
                    <td align="right" style="font-size: 12px;">留言内容：</td>

                    <td>   <textarea id="content" name="content" rows="6" style="width: 80%"></textarea></td>
                </tr>
                <tr>
                    <td align="right" style="font-size: 12px;">留言人：</td>
                    <td ><input id="authorName" name="authorName" type="text" value="<s:property value="authorName"/>" ></td>
                </tr>
                <tr align="center" style="height:25">
                    <td height="30" colspan="2" align="center" nowrap="nowrap" bgcolor="#FFFFFF">
                        <img src="../images/liuyan_tj.jpg" onClick="add()" style="cursor:hand"/>

                    </td>
                </tr>

            </tbody></table>


    </body>
</html>
